<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>广告设置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  
    {include file="public/css"}
    {include file="public/js"}
</head>
<body>

<!-- 后台面包导航 -->
{:get_admin_breadcrumb()}

<blockquote class="layui-elem-quote" style="margin-top:10px;">说明：广告设置</blockquote>



<div class="layui-tab layui-tab-brief " lay-filter="docDemoTabBrief">
  <ul class="layui-tab-title">
    <li class="layui-this">广告设置</li>
  </ul>

  <div class="layui-tab-content" style="height: 100px;">
    <div class="layui-tab-item layui-show">

         <form class="layui-form" action="">
<input type="hidden"  name="groupname" value="{$Request.action}">
          <div class="layui-form-item">
                <label class="layui-form-label"> 广告位状态：</label>
                <div class="layui-input-block">
                  <input type="radio" name="data[ad_position_status]" value="1" title="开启" {if $settings.ad.ad_position_status == 1} checked {/if}>
                  <input type="radio" name="data[ad_position_status]" value="0" title="关闭" {if $settings.ad.ad_position_status == 0} checked {/if}>
                </div>
              </div>   

<!--         
             <div class="layui-form-item">
              <label class="layui-form-label">广告位多城市：</label>
              <div class="layui-input-inline" style="width:400px">
                <input type="radio" name="data[more_city_status]" value="1" title="开启" {if $settings.ad.more_city_status == 1} checked {/if}>
                <input type="radio" name="data[more_city_status]" value="0" title="关闭" {if $settings.ad.more_city_status == 0} checked {/if}>
              </div>
              <div class="layui-form-mid layui-word-aux">{:about('是否开启多城市显示广告')}</div>
            </div>
            -->
           <div class="layui-form-item">
            <label class="layui-form-label"></label>
              <div class="layui-input-block">
                  <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="form">确 定</button>
              </div>
            </div>

                </div>

            


</div> 


<script>
layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(form)', function(data){
    // layer.msg(JSON.stringify(data.field));
    var data =data.field;
    $.post("{:url('settings/update')}",data,function(json){
       if(json.code == 0){
           layer.msg(json.msg);
       }else if(json.code == -1){
           layer.msg(json.msg);
       }
    });
    return false;
  });
});
</script>

</body>

</html>